-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump cryptol specs #2012
Bump cryptol specs #2012
Conversation
Wow. The diff --git a/intTests/test0001/javamd5test.saw b/intTests/test0001/javamd5test.saw
index 5e49c0a7c..e218ac180 100644
--- a/intTests/test0001/javamd5test.saw
+++ b/intTests/test0001/javamd5test.saw
@@ -38,14 +38,15 @@ r2 <- lemma "(a b c d : Vec 8 Bool) -> EqTrue (bvEq 32 (bvOr 32 (bvOr 32 (bvOr 3
// FIXME: This rewrite rule (as well as the unfolding of "md5" and
// "pad" in the proof script below) are a workaround for saw-script
// issue #1010. When that is fixed, we should get rid of them.
-r3 <- lemma "EqTrue (bvEq 1 [True] (bvNat 1 1))";
+r3 <- lemma "EqTrue (bvEq 1 [ecNumber (TCNum 1) Bool PLiteralBit] (bvNat 1 1))";
+r4 <- prove_print w4 {{ \(x : [16][32]) -> groupBy`{32} (convert (join x)) == map (\y -> join (reverse (groupBy`{8} y))) x }};
-let ss = addsimps [t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc,td,te,tf,r1,r2,r3] empty_ss;
+let ss = addsimps [t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc,td,te,tf,r1,r2,r3,r4] empty_ss;
c <- java_load_class "JavaMD5";
jvm_verify c "computeMD5" [] false md5_spec
do {
- unfolding ["md5", "pad"];
+ unfolding ["md5", "prepMsg", "processMsg", "pad"];
simplify ss;
goal_eval;
w4; An explanation as to why each change is necessary:
|
Instead of declaring the diff --git a/Primitive/Keyless/Hash/MD5.md b/Primitive/Keyless/Hash/MD5.md
index bed83d1..ec4f4b2 100644
--- a/Primitive/Keyless/Hash/MD5.md
+++ b/Primitive/Keyless/Hash/MD5.md
@@ -287,7 +287,7 @@ processMsg M = last abcd'
where
abcd0 = initialize
abcd' = [ abcd0 ]
- # [ rounds abcd (groupBy`{32} (convert (join X)))
+ # [ rounds abcd (map convert X)
| abcd <- abcd' | X <- M ]
```
|
See #2012 (comment) for more discussion on this.
Happily, the CI now passes after pushing the changes from #2012 (comment). It's unclear to me if modifying Let's land this. |
Split from #2011, caused by timeout in
intTests/test0001/javamd5test.saw
.