-
Notifications
You must be signed in to change notification settings - Fork 20
Try ignoring high bits in SHA-256 spec #895
Comments
I've done a little experimentation with this, here are my initial thoughts in case anyone wants to add/suggest anything:
These expressions are in fact equivalent if I played with changing the entire cava2 system to ignore high bits of
|
Specifications should be easy to audit, so in order to convince readers that our specs make sense, no "smart invariants" should be needed like "yes but if you check all operations that we use, you'll notice that they all ignore the upper bits". Also, we don't want numbers to become huge when running the spec on examples. So I'd suggest that each operation makes sure to output a number So, compared to what's on the
|
Okay, I think I misunderstood the scale of the suggestion before but I see now -- this is less of a big design change and more of a small tweak to make the spec more robust. |
See discussion in #891
Sam had the idea to write the SHA-256 spec such that intermediate
N
values are allowed to be greater than2^32
, and operations like>>
and concatenation will just ignore high bits. This might make proofs easier; we should try it out and see how it goes!The text was updated successfully, but these errors were encountered: