Skip to content

Commit

Permalink
Include ecEq in cryptol_simpset
Browse files Browse the repository at this point in the history
Fixes #1347.
  • Loading branch information
RyanGlScott committed Jun 22, 2021
1 parent e870373 commit ea4ba3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion cryptol-saw-core/src/Verifier/SAW/Cryptol/Simpset.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ excludedNames =
, "PEq"
, "PCmp"
, "PSignedCmp"
, "ecEq"
]
10 changes: 4 additions & 6 deletions examples/aes/aes.saw
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ dec_enc <-
decrypt_lemma]
(cryptol_ss()));
unfolding ["AESRound", "AESInvRound", "AESFinalRound", "AESFinalInvRound"];
simplify (add_cryptol_defs ["ecEq"]
(add_prelude_eqs ["bvEq_refl"]
simplify (add_prelude_eqs ["bvEq_refl"]
(addsimps [msgToState_stateToMsg,
AddRoundKey_cancel,
InvShiftRows_ShiftRows,
InvSubBytes_SubBytes,
InvMixColumns_MixColumns,
stateToMsg_msgToState]
(cryptol_ss()))));
(cryptol_ss())));
trivial;
}
{{ \msg key -> aesDecrypt (aesEncrypt (msg, key), key) == msg }});
Expand Down Expand Up @@ -116,15 +115,14 @@ enc_dec <-
decrypt_lemma]
(cryptol_ss()));
unfolding ["AESRound", "AESInvRound", "AESFinalRound", "AESFinalInvRound"];
simplify (add_cryptol_defs ["ecEq"]
(add_prelude_eqs ["bvEq_refl"]
simplify (add_prelude_eqs ["bvEq_refl"]
(addsimps [msgToState_stateToMsg,
AddRoundKey_cancel,
ShiftRows_InvShiftRows,
SubBytes_InvSubBytes,
MixColumns_InvMixColumns,
stateToMsg_msgToState]
(cryptol_ss()))));
(cryptol_ss())));
trivial;
}
{{ \msg key -> aesEncrypt (aesDecrypt (msg, key), key) == msg }});
Expand Down

0 comments on commit ea4ba3a

Please sign in to comment.