mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-01 08:32:23 +03:00
More precise definition of chunks
Use `padding` directly in the definition of `chunks`, giving an aligned value to the division.
This commit is contained in:
parent
b93f84cf78
commit
5a43c1d1fe
@ -127,7 +127,7 @@ pad : {msgLen,contentLen,chunks,padding}
|
||||
( fin msgLen
|
||||
, 64 >= width msgLen // message width fits in a word
|
||||
, contentLen == msgLen + 65 // message + header
|
||||
, chunks == (contentLen+511) / 512
|
||||
, chunks == (contentLen+padding) / 512
|
||||
, padding == (512 - contentLen % 512) % 512 // prettier if type #'s could be < 0
|
||||
)
|
||||
=> [msgLen] -> [chunks][512]
|
||||
|
Loading…
Reference in New Issue
Block a user