Skip to content

Commit

Permalink
Fixing failure in SHA512_block_armv8_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pennyannn committed Oct 4, 2024
1 parent 86e65aa commit feb9d39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Proofs/SHA512/SHA512_block_armv8_rules.lean
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ private theorem extractLsb'_high_64_from_zeroExtend_128_or (x y : BitVec 64) :
theorem sha512h_rule_1 (a b c d e : BitVec 128) :
let elements := 2
let esize := 64
let inner_sum := (binary_vector_op_aux 0 elements esize BitVec.add c d (BitVec.zero 128) H)
let outer_sum := (binary_vector_op_aux 0 elements esize BitVec.add inner_sum e (BitVec.zero 128) H)
let inner_sum := (binary_vector_op_aux 0 elements esize BitVec.add c d (BitVec.zero 128))
let outer_sum := (binary_vector_op_aux 0 elements esize BitVec.add inner_sum e (BitVec.zero 128))
let a0 := extractLsb' 0 64 a
let a1 := extractLsb' 64 64 a
let b0 := extractLsb' 0 64 b
Expand Down Expand Up @@ -196,12 +196,12 @@ theorem sha512h_rule_2 (a b c d e : BitVec 128) :
let d1 := extractLsb' 64 64 d
let e0 := extractLsb' 0 64 e
let e1 := extractLsb' 64 64 e
let inner_sum := binary_vector_op_aux 0 2 64 BitVec.add d e (BitVec.zero 128) h1
let inner_sum := binary_vector_op_aux 0 2 64 BitVec.add d e (BitVec.zero 128)
let concat := inner_sum ++ inner_sum
let operand := extractLsb' 64 128 concat
let hi64_spec := compression_update_t1 b1 a0 a1 c1 d0 e0
let lo64_spec := compression_update_t1 (b0 + hi64_spec) b1 a0 c0 d1 e1
sha512h a b (binary_vector_op_aux 0 2 64 BitVec.add c operand (BitVec.zero 128) h2) =
sha512h a b (binary_vector_op_aux 0 2 64 BitVec.add c operand (BitVec.zero 128)) =
hi64_spec ++ lo64_spec := by
repeat (unfold binary_vector_op_aux; simp)
repeat (unfold BitVec.partInstall; simp)
Expand Down

0 comments on commit feb9d39

Please sign in to comment.