Skip to content

Commit

Permalink
Update HMAC proofs for PR aws/aws-lc#1574 (#157)
Browse files Browse the repository at this point in the history
* Update HMAC proofs for PR aws/aws-lc#1574

HMAC precomputed keys PR aws/aws-lc#1574 adds fields to
`hmac_methods_st`, which made the original proof failed.

This commit updates the proof.

This is a breaking change: the updated proof only works
after PR aws/aws-lc#1574 is merged.

* Fix .gitmodules src to point to github.com/fabrice102/aws-lc

---------

Co-authored-by: Fabrice Benhamouda <yfabrice@amazon.com>
  • Loading branch information
fabrice102 and Fabrice Benhamouda committed Jul 19, 2024
1 parent 02aa15c commit ed5f841
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "src"]
path = src
branch = main
url = https://github.com/aws/aws-lc.git
branch = hmac-precompute
url = https://github.com/fabrice102/aws-lc.git
[submodule "cryptol-specs"]
path = cryptol-specs
branch = sha-imperative
Expand Down
13 changes: 10 additions & 3 deletions SAW/proof/HMAC/HMAC-common.saw
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,17 @@ let points_to_md_methods md ptr md_ptr = do {

crucible_points_to (crucible_elem ptr 0) md_ptr;

// Field element 1 is chaining_length.
// Ignoring it, since it is only used when computing HMAC with precomputed keys
// (which is not formally verified).

if md then do {
crucible_points_to (crucible_elem ptr 1) (crucible_global HMAC_MD_INIT);
crucible_points_to (crucible_elem ptr 2) (crucible_global HMAC_MD_UPDATE);
crucible_points_to (crucible_elem ptr 3) (crucible_global HMAC_MD_FINAL);
crucible_points_to (crucible_elem ptr 2) (crucible_global HMAC_MD_INIT);
crucible_points_to (crucible_elem ptr 3) (crucible_global HMAC_MD_UPDATE);
crucible_points_to (crucible_elem ptr 4) (crucible_global HMAC_MD_FINAL);
// Field elements 5 & 6 are ..._Init_from_state and ..._get_state.
// Ignoring them, since they are only used when computing HMAC with precomputed keys
// (which is not formally verified).
} else do {
return ();
};
Expand Down
2 changes: 1 addition & 1 deletion src
Submodule src updated 170 files

0 comments on commit ed5f841

Please sign in to comment.