This commit is contained in:
2025-09-30 20:39:30 -07:00
parent 1a52dd9b2d
commit 8732e75271
2 changed files with 15 additions and 16 deletions

View File

@@ -22,19 +22,19 @@ thm_unfold_iv <- prove_print rme
let verify_hash256 IN_len =
llvm_verify
m "crypto_hash"
[thm_P12]
true
do {
let IN_type = llvm_array IN_len (llvm_int 8);
(IN, IN_ptr) <- fresh_alloc_readonly "IN" IN_type;
m "crypto_hash"
[thm_P12]
true
do {
let IN_type = llvm_array IN_len (llvm_int 8);
(IN, IN_ptr) <- fresh_alloc_readonly "IN" IN_type;
let OUT_type = llvm_array 32 (llvm_int 8);
OUT_ptr <- llvm_alloc OUT_type;
let OUT_type = llvm_array 32 (llvm_int 8);
OUT_ptr <- llvm_alloc OUT_type;
llvm_execute_func [OUT_ptr, IN_ptr, llvm_term {{ `IN_len:[64] }}];
llvm_execute_func [OUT_ptr, IN_ptr, llvm_term {{ `IN_len:[64] }}];
llvm_points_to OUT_ptr (llvm_term {{ Hash256_bytes IN }});
llvm_points_to OUT_ptr (llvm_term {{ Hash256_bytes IN }});
llvm_return (llvm_term {{ 0 : [32] }});
};